1. Field of the Invention
This invention relates to electronic systems, and more particularly to a system and method for reducing bus contention during consecutive back-to-back read and write cycles.
2. Description of the Related Art
Electronic system performance bottlenecks have traditionally been associated with the core processing devices that are a part of the system, such as processors. Processors now operate at speeds of 300 MHz and higher with the ability to process multiple instructions per clock tick. Bottlenecks have thus shifted in many instances from the core processing devices themselves to the memory bus transfer mechanisms that accommodate data storage and transfers associated with the devices.
FIG. 1 is an block diagram of an embodiment of a typical computer system 100. The computing system 100 may be used in a variety of ways, as is well known in the art. A processor 110 is coupled to a system bus 115. An optional cache (not shown) is often coupled between the processor 110 and the system bus 115. A memory controller 120 is also coupled to the system bus 115. Memory requests to memory 130 by the processor 110 are received by the memory controller 120. Interface control circuit 121 in the memory controller 120 directs memory read and write cycles through input/output (I/O) cells 122. Write and read cycles are driven from the I/O cells 122 of the memory controller 120 through the memory bus 125 to the I/O cells 132 of the memory 130.
Bottlenecks can occur if the processor 110 requires access to memory 130 at rates that are greater than the maximum transfer rates associated the system bus 115 and/or the memory bus 125. The time it takes for the memory 130 to respond to a memory read or write cycle (i.e. the latency) also presents a bottleneck to data flow, if the processor has to wait for the memory to finish its read or write cycle before continuing processing.
For computer memories, in particular, moving from asynchronous memory types to synchronous memory types has shortened the latencies for data transfers. In both types of communication, the accurate transmission and reception of the data at a remote end is dependent on a sender and a receiver maintaining synchronization during the data transfer. The receiver must sample the signal in phase with the sender. If the sender and receiver were both supplied by exactly the same clock source, then transmission could take place forever with the assurance that signal sampling at the receiver is always in perfect synchronization with the transmitter. This is seldom the case, so in practice the receiver may be periodically brought into synch with the transmitter. It is left to the internal clocking accuracy of the transmitter and receiver to maintain sampling integrity between synchronization pulses.
In asynchronous communications, once called xe2x80x9cstart-stopxe2x80x9d communications, each byte of data is potentially a separate unit. The sender can pause between any two bytes of a message. The receiver, however, may have to catch the data as quickly as it arrives. To accomplish this, asynchronous data require one extra bit""s worth of time to announce the beginning of a new byte (the xe2x80x9cstartxe2x80x9d bit) and one extra bit""s worth of time at the end (the xe2x80x9cstopxe2x80x9d bit). Thus, a 2400-baud modem may transfer only 240 bytes of data per second, because each byte would require a minimum of 10 bits.
In synchronous communications, such as used by synchronous dynamic random access memory (SDRAM), the receiving clock is synchronized with the sending clock so the timing of the receiver and the timing of the sender are in synch. Data transfers may include multiple bytes of data in one transmission, such as a xe2x80x98burstxe2x80x99 or xe2x80x98pipelinexe2x80x99 mode transmission. Synchronous transfers save time in transmitting data by eliminating the start and stop bits for each byte of data.
One problem that still remains with some synchronous memory transfers is that dead clock cycles, sometimes called NOPs or wait states, must be provided on the address and/or data buses when transitioning from a read to a write, or from a write to a read. For example, both Late-Write (L-W) SRAM and Pipeline Burst (PB) SRAM can perform back-to-back read-read cycles or write-write cycles. L-W SRAM has one dead clock cycle on both the data and address buses for a transition from a read to a write. PB SRAM has two dead clock cycles on the data bus each time the data bus transitions from a write to a read. PB SRAM has two dead clock cycles on both the address and data buses each time the data bus transitions from a read to a write.
The industry responded to the problem of the dead clock cycles with the advent of ZERO-BUS TURNAROUND (ZBT) synchronous static random access memory (SRAM). The ZBT feature, an example of a zero bus turnaround protocol, is designed to optimize system performance in applications that frequently turn the memory data bus around, thus transitioning between reads and writes. Such applications invoke many random inter-mixed read and write operations on the data bus as opposed to bursts of read or writes. The ZBT SRAM, as with any memory that conforms to a zero bus turnaround protocol, is designed to improve performance by eliminating wasted cycles in-between memory read cycles and memory write cycles.
The general operation of ZBT SRAM is as follows. During a first clock cycle, address and control signal are presented to the memory inputs. One or two clock cycles later, the associated data cycle occurs, either a read or a write. The address and control lines and their operation are not shown herein as they are well known in the art. During each clock cycle, ZBT SRAM is reportedly capable of 100% bandwidth utilization during a long string of consecutive alternating read and write cycles, as is shown below in FIG. 3.
Important ZBT SRAM parameters include tKHQX, tKHQX1, and tKHQZ. The parameter tKHQX represents the output hold time. This is the time that the data must be valid after the rising clock edge. Representative values for parameter tKHQX are 1.5 ns minimum to 3.5 ns maximum. The parameter tKHQX1 represents the clock high to output active time. This is the minimum time from a rising clock edge before data can be output on the memory bus. Representative value for parameter tKHQX1 is 1.5 ns. The parameter tKHQZ represents the clock high to data line high impedance. This is the time after a rising clock edge before the memory bus can be in a high impedance state. Representative values for parameter tKHQZ is 1.5 ns minimum and 3.5 ns maximum.
FIG. 2 illustrates a block diagram of an embodiment of prior art I/O cells 122A/132A for the memory controller 120 and the memory 130. The I/O cell group 200 shown in FIG. 2 represents the portion of the memory controller and memory that transfers a single bit of data. Thus, a plurality of such groups 200 is normally present in a memory system with a multiple byte wide memory bus.
I/O cell 122A of the memory controller includes a control signal TS input at 205, which controls a three-state buffer 210. The three-state buffer 210 drives the contents of the write register 220 onto the data line 125A of the memory bus 125. A bit to be written to memory is presented to the register at input 225 and latched to into the register 220 on the rising age of the clock signal (CLK) at input 236. A data bit read from the memory is received on the data line 125A and driven by read buffer 215 to a read register 230. The data bit is latched into the read register 230 on the rising edge of a clock signal and is available at output 235 for routing through the memory controller to a system bus.
I/O cell 132A of the memory includes a control signal OE input at 240, which controls a three-state buffer 245. Three-state buffer 245 drives the contents of the read register 255 onto the data line 125A of the memory bus 125. A bit to be read from memory is presented to the register at input IN 260 (from an internal memory array, not shown) and is latched into the register 255. Data to be written into memory is received on the data line 125A and driven by write buffer 250 to a write register 265. The data bit is latched into the write register 265 on the rising edge of a clock signal and is provided to the memory array at 270.
FIG. 3 illustrates an example timing diagram for a write-read-write-read data sequence during consecutive clock cycles for ZBT SRAM. For this example, the clock rate is 133 MHz. This clock rate has a clock period of 7.5 ns. From top to bottom, the signals shown are the clock, the controller write data signal W 310, which is presented at input 225 in FIG. 2, the controller control signal TS 315, which is presented at 205 in FIG. 2, and the read or write data signal 320 which is presented at data terminal t1 to the data line 125A. For this example, it is assumed that the address and control signals are presented one or more clock cycles ahead of the respective read or write.
Prior to clock cycle 301, the controller provides write data at input W 225. During clock cycle 301, the controller asserts control signal TS at 205, and a write data pulse 340 is driven on the data line 125A. The length of each data pulse is a full 7.5 ns (i.e. the entire duration of the clock pulse). The controller signals nominally start and stop at the beginning and end of each clock pulse. Delays inherent in the memory controller lead to a nominal delay in the start of the write data pulse 340 on the data line 125A and lead to the data pulse ending an equal time after the end of the clock cycle 301.
During clock cycle 302, the memory is outputting read data. The read data pulse 350 is also driven onto the data line after a short delay. This short delay means that the read data pulse 350 is driven on the data line starting slightly after the start of the clock cycle 302 and ending at slightly past the end of the clock cycle 302.
During clock cycle 303, the controller again inputs write data at input W 225, the controller outputs control signal TS at 205, and a write data pulse 360 is driven on the data line 125A. The start of the write data pulse 360 is again delayed from the 15.0 ns start of the clock cycle 303. The write data pulse 360 does not end until after the end of clock cycle 303.
Another read cycle occurs during clock cycle 304. The read data pulse 370 is also driven onto the data line after a short delay. This short delay means that the read data pulse 370 is driven on the data line starting slightly after the start of the clock cycle 304 and ending at slightly past the end of the clock cycle 304.
Although ZBT SRAM is designed for consecutive back-to-back read and write cycles, contention may still occur on the memory data bus. For example, if a write data pulse is driven on the data line for too long past the end of the clock cycle, or if a consecutive a read data pulse is driven on the data line too soon, then bus contention can occur. Skew between the memory controller clock and the memory clock may lead to bus contention. Variability in manufacturing processes may also lead to bus contention since the timing parameters for the memory and the memory controller may not be precisely the same.
The primary concern with bus contention (i.e. when the memory controller is driving data on the data line at the same time the memory is driving data on the data line) is overcurrent through the electronics comprising the memory system. Overcurrent occurs when the opposite ends of the bus are being pulled in opposite electrical directions. For example the controller may be driving a logic zero on the bus at the same time the memory is driving a logic one. Thus, the controller three-state buffer is driving the bus low to ground while the ZBT SRAM three-state buffer is driving the bus high.
Parasitic impedance will limit the actual current, but the value of this current will be significantly higher than during the non-overlapping sequence. Under these conditions, there is an effective short circuit between the high voltage and the ground. It has been determined that the worst-case scenario would be the controller driving a logical zero while the ZBT SRAM drives a logical one, assuming that the memory drives more current and switches on faster than the memory controller. The number of bit lines in the bus magnifies this situation. These high currents can generate noise impulses and overheating in the memory controller and/or the memory. The noise effects can be difficult to diagnose when the system is operational and may not surface until a specific combination of device process variations occur together.
It would thus be desirable to have an apparatus, system, and method for speeding up data transfers while reducing bus contention during consecutive, back-to-back read-write operations. The apparatus, system, and method are preferably compatible with existing memory systems with minimal changes to hardware.
The problems outlined above are in large part solved by an apparatus, system, and method for precisely controlling the timing of data transfers while reducing bus contention during consecutive read-write operations. By reducing the length of time during which selected data pulses are driven on the memory bus, a higher percentage of usage of the memory bus may be attained without increasing the likelihood of bus contention and resulting degradation or damage to the memory system. The selected data pulse is preferably the write data pulse driven on the memory bus by the memory controller. In various embodiments, a zero bus turnaround protocol is implemented.
In one embodiment, a memory controller may include interface circuitry and write control circuitry that outputs an associated control signal to a three-state buffer. The three-state buffer, after being enabled by the associated control signal, drives write data on a data line of a memory bus. The turn-on delay associated with the three-state buffer exceeds the turn-off delay also associated with the three-state buffer. Thus, the three-state buffer drives the write data pulse on the data line for a shorter period of time than the period of time that the associated control signal provided by the write control circuitry is asserted to enable the three-state buffer. This feature may advantageously result in reducing bus contention while requiring minimal modification to the memory controller circuitry.
In another embodiment, a memory controller may include write control circuitry that outputs an associated control signal and a three-state buffer which is enabled by the control signal to drive write data on a data line of a memory bus. The write control circuitry outputs the associated control signal for a shorter period of time than the memory controller clock period or for a shorter period of time than the duration of a memory read data pulse (generated on the memory bus by the memory). The write control circuitry may delay asserting the control signal for a period of time after the start of a memory controller clock pulse to thereby delay the time at which write data is provided to the memory bus through the three-state buffer and/or may deassert the control signal at a predetermined time prior to the end of the memory controller clock pulse to thereby discontinue the drive of write data on the memory bus. The memory controller may advantageously attain reduced bus contention while requiring relatively few changes in the overall system design.